// 搜索配置
export const searchOption = ref({
  formConfig: {
    tenantId: {
      label: "客户ID",
      labelWidth: 70,
      component: "el-input",
      clearable: true,
      enterToSearch: true,
    },
    customerName: {
      label: "客户名称",
      labelWidth: 70,
      component: "el-input",
      clearable: true,
      enterToSearch: true,
    },
    operationModeId: {
      label: "运营模式",
      labelWidth: 70,
      component: "el-select",
      clearable: true,
      changeToSearch: true,
      dicUrl: Api.mode.GetModeList,
      dicFormatter: res => res.data || [],
    },
    updateName: {
      label: "操作人员",
      labelWidth: 70,
      component: "el-input",
      clearable: true,
    },
    // 开通时间
    createTime: {
      label: "开通时间",
      labelWidth: 70,
      component: "el-date-picker",
      type: "daterange",
      startPlaceholder: "开始日期",
      endPlaceholder: "结束日期",
      valueFormat: "YYYY-MM-DD",
      format: "YYYY-MM-DD",
      clearable: true,
    },
    // 到期时间
    expirationTime: {
      label: "到期时间",
      labelWidth: 70,
      component: "el-date-picker",
      type: "daterange",
      startPlaceholder: "开始日期",
      endPlaceholder: "结束日期",
      valueFormat: "YYYY-MM-DD",
      format: "YYYY-MM-DD",
      clearable: true,
    },
  },
});

// 表格配置
export const tableOption = ref(
  Utils.tools.deleteSearchConfig({
    // 弹窗宽度
    dialogWidth: "30%",
    // 是否显示编辑按钮
    editBtn: false,
    // 是否显示删除按钮
    delBtn: false,
    // 菜单宽度 单个按钮 52px 按钮容器内边距 8px 例如：4个按钮 = 52 * 4 * 8
    menuWidth: 216,
    // 表格配置
    column: {
      // 客户ID
      tenantId: {
        label: "客户ID",
        width: 120,
      },
      // 客户名称
      customerName: {
        label: "客户名称",
        width: 320,
      },
      // 运营模式
      operationModeName: {
        label: "运营模式",
        width: 120,
      },
      // 经营渠道
      businessChannel: {
        label: "经营渠道",
        minWidth: 120,
      },
      // 开通时间
      createTime: {
        label: "开通时间",
        width: 180,
        type: "datetime",
        format: "YYYY-MM-DD HH:mm:ss",
        valueFormat: "YYYY-MM-DD HH:mm:ss",
        sortable: true,
      },
      // 到期时间
      validityPeriodEnd: {
        label: "到期时间",
        width: 180,
        type: "date",
        format: "YYYY-MM-DD",
        valueFormat: "YYYY-MM-DD",
        sortable: true,
      },
      // 操作人员
      updateName: {
        label: "操作人员",
        width: 120,
      },
      // 续费记录
      renewalRecord: {
        label: "续费记录",
        width: 120,
      },
      // 开通应用数量
      applicationNum: {
        label: "开通应用",
        width: 120,
      },
    },
  })
);
